
package com.googlecode.mvndroid;

import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.project.MavenProject;

/**
 * Abstract Android mojo.
 * 
 * <a href="mailto:1.024e3@gmail.com">Bartosz Duzy</a>
 */
abstract public class AndroidMojo extends AbstractMojo {

    /**
     * Project instance, used to add new source directory to the build.
     *
     * @parameter default-value="${project}"
     */
    private MavenProject project;

    /**
     * @parameter expression="${basedir}"
     */
    private File baseDir;
    /**
     * @parameter expression="${project.build.directory}"
     */
    private File outDir;
    /**
     * @parameter expression="${env.ANDROID_SDK}${file.separator}tools"
     */
    private File androidToolsDir;
    /**
     * @parameter expression="${env.ANDROID_SDK}${file.separator}tools${file.separator}lib${file.separator}framework.aidl"
     */
    private File androidFramework;
    /**
     * @parameter
     * @required
     */
    private File resDir;
    /**
     * @parameter expression="${basedir}${file.separator}assets"
     */
    private File assetDir;
    /**
     * @parameter expression="${project.build.sourceDirectory}"
     */
    private File srcDir;
    /**
     * @parameter expression="${basedir}${file.separator}libs"
     */
    private File externalLibsDir;
    /**
     * @parameter expression="${basedir}${file.separator}libs"
     */
    private File nativeLibsDir;
    /**
     * @parameter expression="${project.build.outputDirectory}"
     */
    private File outDirClasses;
    /**
     * @parameter expression="${project.build.sourceDirectory}"
     */
    private File outDirR;
    /**
     * @parameter expression="${project.build.directory}${file.separator}classes.dex"
     */
    private File dexFile;
    /**
     * @parameter expression="${project.build.directory}${file.separator}${project.name}.ap_"
     */
    private File resourcesPackage;
    /**
     * @parameter expression="${project.build.directory}${file.separator}${project.name}-debug-${project.version}.apk"
     */
    private File outDebugPackage;
    /**
     * @parameter expression="${project.build.directory}${file.separator}${project.name}-unsigned-${project.version}.apk"
     */
    private File outUnsignedPackage;
    //other stuff
    /**
     * @parameter expression="${env.ANDROID_SDK}"
     */
    private File androidDir;
    /**
     * @parameter expression="${env.ANDROID_SDK}${file.separator}android.jar"
     */
    private File androidJar;
    /**
     * @parameter expression="${basedir}${file.separator}AndroidManifest.xml"
     */
    private File androidManifestFile;

    /**
     * @parameter 
     */
    private boolean generateUnsignedPackage;


    /**
     * @parameter
     */
    private File aidlOutDir;

    private int emulatorPort = 5554;

    private String emulatorHost = "localhost";

    /**
     * @return the baseDir
     */
    public File getBaseDir() {
        return baseDir;
    }

    /**
     * @return the outDir
     */
    public File getOutDir() {
        return outDir;
    }

    /**
     * @return the androidToolsDir
     */
    public File getAndroidToolsDir() {
        return androidToolsDir;
    }

    /**
     * @return the androidFramework
     */
    public File getAndroidFramework() {
        return androidFramework;
    }

    /**
     * @return the resDir
     */
    public File getResDir() {
        return resDir;
    }

    /**
     * @return the assetDir
     */
    public File getAssetDir() {
        return assetDir;
    }

    /**
     * @return the srcDir
     */
    public File getSrcDir() {
        return srcDir;
    }

    /**
     * @return the externalLibsDir
     */
    public File getExternalLibsDir() {
        return externalLibsDir;
    }

    /**
     * @return the nativeLibsDir
     */
    public File getNativeLibsDir() {
        return nativeLibsDir;
    }

    /**
     * @return the outDirClasses
     */
    public File getOutDirClasses() {
        return outDirClasses;
    }

    /**
     * @return the outDirR
     */
    public File getOutDirR() {
        return outDirR;
    }

    /**
     * @return the dexFile
     */
    public File getDexFile() {
        return dexFile;
    }

    /**
     * @return the resourcesPackage
     */
    public File getResourcesPackage() {
        return resourcesPackage;
    }

    /**
     * @return the outDebugPackage
     */
    public File getOutDebugPackage() {
        return outDebugPackage;
    }

    /**
     * @return the outUnsignedPackage
     */
    public File getOutUnsignedPackage() {
        return outUnsignedPackage;
    }

    /**
     * @return the androidDir
     */
    public File getAndroidDir() {
        return androidDir;
    }

    /**
     * @return the androidJar
     */
    public File getAndroidJar() {
        return androidJar;
    }

    /**
     * @return the androidManifestFile
     */
    public File getAndroidManifestFile() {
        return androidManifestFile;
    }

    /**
     * @return the project
     */
    public MavenProject getProject() {
        return project;
    }

    /**
     * @return the generateUnsignedPackage
     */
    public boolean isGenerateUnsignedPackage() {
        return generateUnsignedPackage;
    }

    /**
     * @return the emulatorPort
     */
    public int getEmulatorPort() {
        return emulatorPort;
    }

    /**
     * @return the emulatorHost
     */
    public String getEmulatorHost() {
        return emulatorHost;
    }

    /**
     * @return the aidlOutDir
     */
    public File getAidlOutDir() {
        return aidlOutDir;
    }


}
